package public

import (
	"context"
	"git.900sui.cn/kc/rpcinterface/client"
	"git.900sui.cn/kc/rpcinterface/interface/public"
)

type Cnaps struct {
	client.Baseclient
}

//实例化
func (c *Cnaps) Init() *Cnaps {
	c.ServiceName = "rpc_public"
	c.ServicePath = "Cnaps"
	return c
}

//根据开户行名称模糊获取所有的数据
func (c *Cnaps) GetAllCnapsByBankName(ctx context.Context, args *public.ArgsGetAllCnapsByBankName, reply *public.ReplyGetAllCnapsByBankName) error {
	return c.Call(ctx, "GetAllCnapsByBankName", args, reply)
}

//根据银行联行号获取指定的数据
func (c *Cnaps) GetCnapInfoByBankCode(ctx context.Context, args *public.ArgsGetCnapInfoByBankCode, reply *public.GetAllCnapsByBankNameBase) error {
	return c.Call(ctx, "GetCnapInfoByBankCode", args, reply)
}
